package com.sghd.fight.module.game.event;

import com.sghd.fight.utils.Callback;

public class GameServerEvent {
    public static final String NAME = "ROOM:GAME_SERVER_EVENT";
    /**消息体*/
    private Object body;
    /**对应的命令*/
    private int command;
    /**回调函数*/
    private Callback callback;

    public static GameServerEvent valueOf(Object body, int command, Callback callback) {
        GameServerEvent result = new GameServerEvent();
        result.body = body;
        result.command = command;
        result.callback = callback;
        return result;
    }

    public Object getBody() {
        return body;
    }

    public int getCommand() {
        return command;
    }

    public Callback getCallback() {
        return callback;
    }
}